<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Index</title>
    <link th:replace="includes :: link">
    <script th:replace="includes :: script"></script>
    <style th:replace="includes :: style"></style>
</head>
<body class="layui-layout-body">
<div class="layui-layout">
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree">
                <li class="layui-nav-item"><a id="logout" th:href="@{/user/logout}"><span th:text="${session.loginUser}"></span> 用户注销</a></li>
                <li class="layui-nav-item"><a href="javascript:" th:id="page" th:data="page">首页</a></li>
                <li class="layui-nav-item">
                    <a class="" href="javascript:">功率预测部分</a>
                    <dl class="layui-nav-child">
                        <!--<dd><a href="javascript:" th:id="page1" th:data="page1">数据展示与整合</a></dd>-->
                        <!--<dd><a href="javascript:" th:id="page2" th:data="page2">模型训练</a></dd>-->
                        <dd><a href="javascript:" th:id="page" th:data="page">功率预测</a></dd>

<!--                        <dd><a href="javascript:" th:id="page4" th:data="page4">进度条测试</a></dd>-->
                    </dl>
                </li>
                <!--<li class="layui-nav-item">-->
                    <!--<a class="" href="javascript:">换料设计部分</a>-->
                    <!--<dl class="layui-nav-child">-->
                        <!--<dd><a th:id="page3" data="http://localhost:8080/corphy_war_exploded/a/cdesign/hwrRefuellingSequence?menuId=03e29c9f85e4405b8b543de2f6a21671">换料顺序清单及优化</a></dd>-->
<!---->
                    <!--</dl>-->
                <!--</li>-->
            </ul>
        </div>
    </div>

    <div class="layui-body">
        <div class="layui-tab layui-tab-brief" style="margin-top:0;" lay-filter="pages" lay-allowClose="true">
            <ul class="layui-tab-title">
            </ul>
            <div class="layui-tab-content">
            </div>
        </div>
    </div>
</div>

<script>
    /*<![CDATA[*/
    layui.use('element', function(){
        var element = layui.element;

        $('.layui-nav-item a').on('click', function () {
            var id = 'tab-' + $(this).attr('id');
            var url = $(this).attr('data');
            if ($('[lay-id=' + id + ']').length == 0 && url) {
                element.tabAdd('pages', {
                    id: id,
                    title: $(this).text(),
                    content: '<iframe src="' + url + '" style="width:100%;height: 900px"></iframe>'
                });
            }
            element.tabChange('pages', id);
        });

        $('#pagination').click();

    });
    /*]]>*/
</script>
</body>
</html>